using UnityEngine;
using System.Collections;

public class AnimacionPlayer : MonoBehaviour {
	
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		if ((Input.GetKey(KeyCode.A)) || (Input.GetKey(KeyCode.D)) || (Input.GetKey(KeyCode.S)) || (Input.GetKey(KeyCode.W)) ){			
			foreach (AnimationState state in animation) {
			//	if (state.clip.Equals("Caminar")) {
					if( Input.GetKey(KeyCode.LeftShift)) {
						state.speed = 1F *3;
					} else {
						state.speed = 1F;
					}	
			//	}
				
			}		
		} else {
			foreach (AnimationState state in animation) {
			//	if (state.clip.Equals("Caminar")){ 				
	        		state.speed = 0F;
			//	}
								
	    	}
		}		
	
	}
	
}
